blob: 8f02b655e7e5ef0a1c5265b333a8be5f172d8c1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
---
import type { GetStaticPaths } from "astro";
import { getCollection } from "astro:content";
import BlogSingleLayout from "@/layouts/BlogSingleLayout.astro";
export const getStaticPaths: GetStaticPaths = async () => {
const entries = await getCollection("blog");
return entries.map((entry: any) => ({
params: { id: entry.id },
props: { entry },
}));
};
const { entry } = Astro.props;
---
<BlogSingleLayout entry={entry} />
|